Skip to content

🩹 [Patch]: Permission catalog now recognizes 12 additional GitHub App permissions#570

Merged
Marius Storhaug (MariusStorhaug) merged 2 commits intomainfrom
fix/569-add-missing-permission-definitions
Apr 1, 2026
Merged

🩹 [Patch]: Permission catalog now recognizes 12 additional GitHub App permissions#570
Marius Storhaug (MariusStorhaug) merged 2 commits intomainfrom
fix/569-add-missing-permission-definitions

Conversation

@MariusStorhaug
Copy link
Copy Markdown
Member

The permission catalog used to map GitHub App fine-grained permissions now includes 12 additional permissions recently introduced by GitHub. Previously, any installation that had these permissions granted would cause Test-Permissions jobs to fail on all platforms because the catalog did not recognize them.

Fixed: Permission tests no longer fail for newly added GitHub App permissions

The Test-Permissions integration tests validate that every permission on an installation context exists in the module's permission catalog. GitHub added 12 new fine-grained permissions that were not in the catalog, causing test failures across Linux, macOS, and Windows.

All 12 permissions are now defined in the catalog with correct scope, display name, description, and documentation URL (where available).

New Repository permission

Permission Display name Scope
artifact_metadata Artifact metadata Repository

New Organization permissions

Permission Display name Scope
custom_properties_for_organizations Custom properties for organizations Organization
organization_copilot_metrics Organization Copilot metrics Organization
organization_credentials Organization credentials Organization
organization_dependabot_dismissal_requests Organization Dependabot dismissal requests Organization
organization_runner_custom_images Hosted runner custom images Organization

New Enterprise permissions

Permission Display name Scope
enterprise_ai_controls Enterprise AI controls Enterprise
enterprise_copilot_metrics Enterprise Copilot metrics Enterprise
enterprise_credentials Enterprise credentials Enterprise
enterprise_custom_enterprise_roles Enterprise custom enterprise roles Enterprise
enterprise_custom_properties_for_organizations Enterprise custom properties for organizations Enterprise
enterprise_teams Enterprise teams Enterprise

Technical Details

  • All 12 entries added to the NewPermissionList() static method in GitHubPermission class (src/classes/public/GitHubPermission.ps1)
  • Entries follow the existing [GitHubPermission]::new() 7-argument pattern and are inserted alphabetically within their scope section
  • Permissions with existing GitHub Docs pages use the full documentation URL; those without use the base permissions page URL
  • enterprise_copilot_metrics and organization_copilot_metrics use @('read') only (metrics are read-only); all others default to @('read', 'write')

@MariusStorhaug Marius Storhaug (MariusStorhaug) marked this pull request as ready for review March 29, 2026 14:58
Copilot AI review requested due to automatic review settings March 29, 2026 14:58
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Expands the module’s GitHub App fine-grained permission catalog so Test-Permissions integration tests no longer fail when GitHub returns newly introduced permissions (Fixes #569).

Changes:

  • Added 12 new fine-grained permission definitions (Repository/Organization/Enterprise) to the GitHubPermission catalog.
  • Updated documentation URLs and access options (read vs read/write) for the new permissions.
  • Includes minor whitespace-only formatting adjustments in two public functions.

Reviewed changes

Copilot reviewed 1 out of 3 changed files in this pull request and generated 3 comments.

File Description
src/classes/public/GitHubPermission.ps1 Adds missing fine-grained permission entries to the central permission catalog used by permission validation/tests.
src/functions/public/Repositories/Repositories/Get-GitHubRepositoryFork.ps1 Whitespace-only formatting change in request body construction.
src/functions/public/Gitignore/Get-GitHubGitignore.ps1 Whitespace-only formatting change in parameter splat construction.

@MariusStorhaug Marius Storhaug (MariusStorhaug) merged commit 8d083e2 into main Apr 1, 2026
669 of 696 checks passed
@MariusStorhaug Marius Storhaug (MariusStorhaug) deleted the fix/569-add-missing-permission-definitions branch April 1, 2026 09:37
@github-project-automation github-project-automation bot moved this from Todo to Done in GitHub PowerShell Module Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Add 12 missing permission definitions to GitHubPermission catalog

2 participants